package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.Waybills;
import org.apache.ibatis.annotations.Param;

/**
 * 运单Mapper接口
 * 
 * @author he
 * @date 2025-08-18
 */
public interface WaybillsMapper 
{
    /**
     * 查询运单
     * 
     * @param id 运单主键
     * @return 运单
     */
    public Waybills selectWaybillsById(Long id);

    /**
     * 查询运单列表
     * 
     * @param waybills 运单
     * @return 运单集合
     */
    public List<Waybills> selectWaybillsList(Waybills waybills);

    /**
     * 新增运单
     * 
     * @param waybills 运单
     * @return 结果
     */
    public int insertWaybills(Waybills waybills);

    /**
     * 修改运单
     * 
     * @param waybills 运单
     * @return 结果
     */
    public int updateWaybills(Waybills waybills);

    /**
     * 删除运单
     * 
     * @param id 运单主键
     * @return 结果
     */
    public int deleteWaybillsById(Long id);

    /**
     * 批量删除运单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWaybillsByIds(Long[] ids);

    int signStateChange(List<Long> ids);

    Waybills selectWaybillsByCode(Waybills waybills);

    List<Waybills> selectWaybillsComplate(Waybills waybills);

    /**
     * 已核对
     * @param collect1
     */
    void updateWaybillsHandleState(List<Long> collect1);

    void rebackState(@Param("id") Long id, @Param("yyskState") Long yyskState);

    void updateWaybillsCheckUp(Waybills waybills);

    void updateWaybillsCheckUpBatch(@Param("list") List<Long> collect,@Param("state") int i,@Param("reason") String s);

    /**
     * 批量更新审批状态
     * 
     * @param ids 运单ID列表
     * @param approvalState 审批状态
     * @return 结果
     */
    int updateApprovalState(@Param("ids") List<Long> ids, @Param("approvalState") Integer approvalState);
}
